//
//  ControlEventViewController.swift
//  DemoProject
//
//  Created by hao on 2018/7/18.
//  Copyright © 2018年 hao. All rights reserved.
//

import UIKit

class ControlEventViewController: BaseTableViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        print(info: "\(isiPhone8Screen())")
        setupData()
    }
    
    private func setupData() {
        let titles = ["UIControlEventTouchDown",
                      "UIControlEventTouchDownRepeat",
                      "UIControlEventTouchDragInside",
                      "UIControlEventTouchDragOutside",
                      "UIControlEventTouchDragEnter",
                      "UIControlEventTouchDragExit",
                      "UIControlEventTouchUpInside",
                      "UIControlEventTouchUpOutside",
                      "UIControlEventTouchCancel",
                      "UIControlEventTouchChanged",
                      "UIControlEventEditingDidBegin",
                      "UIControlEventEditingChanged",
                      "UIControlEventEditingDidEnd",
                      "UIControlEventEditingDidOnExit",
                      "UIControlEventAlltouchEvents",
                      "UIControlEventAllEditingEvents",
                      "UIControlEventAllEvents"]
        
        let descArr = ["单点触摸按下事件：用户点触屏幕，或者又有新手指落下的时候",
                       "多点触摸按下事件，点触计数大于1：用户按下第二、三、或第四根手指的时候",
                       "当一次触摸在控件窗口内拖动时",
                       "当一次触摸在控件窗口之外拖动时",
                       "当一次触摸从控件窗口之外拖动到内部时",
                       "当一次触摸从控件窗口内部拖动到外部时",
                       "所有在控件之内触摸抬起事件",
                       "所有在控件之外触摸抬起事件(点触必须开始与控件内部才会发送通知)",
                       "所有触摸取消事件，即一次触摸因为放上了太多手指而被取消，或者被上锁或者电话呼叫打断",
                       "当控件的值发生改变时，发送通知。用于滑块、分段控件、以及其他取值的控件。你可以配置滑块控件何时发送通知，在滑块被放下时发送，或者在被拖动时发送",
                       "当文本控件中开始编辑时发送通知",
                       "当文本控件中的文本被改变时发送通知",
                       "当文本控件中编辑结束时发送通知",
                       "当文本控件内通过按下回车键（或等价行为）结束编辑时，发送通知",
                       "通知所有触摸事件",
                       "通知所有关于文本编辑的事件",
                       "通知所有事件"]
        
        addTitles(titles, footDescs: descArr)
    }

}
